<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditCarreservationTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditCarreservationLabel_idCarReservation}" for="idCarReservation" />
                    <h:outputText id="idCarReservation" value="#{carreservationController.selected.idCarReservation}"/>
                    <h:outputLabel value="#{bundle.EditCarreservationLabel_deposit}" for="deposit" />
                    <h:inputText id="deposit" value="#{carreservationController.selected.deposit}" title="#{bundle.EditCarreservationTitle_deposit}" required="true" requiredMessage="#{bundle.EditCarreservationRequiredMessage_deposit}"/>
                    <h:outputLabel value="#{bundle.EditCarreservationLabel_car}" for="car" />
                    <h:selectOneMenu id="car" value="#{carreservationController.selected.car}" title="#{bundle.EditCarreservationTitle_car}" required="true" requiredMessage="#{bundle.EditCarreservationRequiredMessage_car}">
                        <f:selectItems value="#{carController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.pickUpLocation}" for="pickUpLocation" />
                    <h:selectOneMenu id="pickUpLocation" value="#{carreservationController.selected.pickUpLocation}" title="#{bundle.EditCarreservationTitle_pickUpLocation}" required="true" requiredMessage="#{bundle.EditCarreservationRequiredMessage_pickUpLocation}">
                        <f:selectItems value="#{pickuplocationController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.pickUpDate}" for="pickUpDate" />
                    <h:inputText id="pickUpDate" value="#{carreservationController.selected.pickUpDate}" title="#{bundle.EditCarreservationTitle_pickUpDate}" required="true" requiredMessage="#{bundle.EditCarreservationRequiredMessage_pickUpDate}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                </h:panelGrid>
                <h:commandLink action="#{carreservationController.update}" value="#{bundle.EditCarreservationSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditCarreservationViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{carreservationController.prepareList}" value="#{bundle.EditCarreservationShowAllLink}" immediate="true"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
